PRB13: Sampath's Struggles! // Beginner

 
Lately, Sampath has not been enjoying himself in AP Statistics. All the long paragraph style problems simply became too much for him, and thus he decided to go back to solving problems from his glory days, namely Algebra 2. Sampath attempted a problem regarding the multiplication of matrices, but was so frustrated with inability to solve it that he coded a program to help him multiple SQUARE matrices.

Input Format

1st line: N or Dimension of squared matrices
The following 2N lines are the square matrices.

Sample Input

3
1 2 3
4 5 6
7 8 9
2 3 4
5 6 7
8 9 1

Output Format

A matrix representing the product of the two square matrices.

Sample Output

36 42 21
81 96 57
126 150 93




You must be logged in to submit a solution.